 
 

<?php
 if($_SESSION["Game"])
				$nextGame =$_SESSION["Game"];
				else
				$nextGame =1;
$lines = file('./solution/beginer/'.$nextGame.'.slu');
echo '<s:game xmlns:s="http://www.example.com/sudoku">';

foreach ($lines as $line_num => $line) {
    $line = str_replace(" ", "", $line);
    $line = str_replace("\n", "", $line);
	
    if ($line_num > 0 && $line != '' && $line_num != 4 && $line_num != 8) {
	
       echo "<s:row>";  
	   
       for ($x = 0; $x < 9; $x++){
		   if($x==3)
		   {
			   ?><div class="vong1"><?php
            $thisBox = substr($line, $x, 1);
            if ($thisBox == "0") {
                echo "<s:box></s:box>";
            } else {
                echo "<s:box s:ro='yes'>".$thisBox."</s:box>";
				
            }
			?></div><?php
		   }
		   else
		   
			$thisBox = substr($line, $x, 1);
            if ($thisBox == "0") {
                echo "<s:box></s:box>";
            } else {
                echo "<s:box s:ro='yes'>".$thisBox."</s:box>";
				
            }
       }
       echo "</s:row>";
	   
    }
}

echo "      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:square><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box><s:box></s:box></s:square>
      <s:submitButtonElement>Submit</s:submitButtonElement>
      <s:showsubmit>no</s:showsubmit>
      <s:correctRows>no</s:correctRows>";

echo '</s:game>';
?>
 